﻿<?php

// Generation contenu du tableau de la facture
$rows = "";
$total = 0;

foreach($this->res as $l) {
	$rows .= "<tr><td>".$l['f_titre']."</td><td>".$l['loc_deb']."</td><td>"
           . $l['loc_fin']."</td><td>".$l['loc_montant']." €</td></tr>\n";
    $total += $l['loc_montant'];
}

if($rows!=""){
	$content = "<div class=tableau1>";
    $content .= "<table><tr><th>Film loué</th><th>Loué le </th>"
             . "<th>Rendu le</th><th>Montant</th></tr>\n";
    $content .= $rows;
    $content .= "</table></div>";
}
else {
	$content = "<p>Aucune Location</p>" ;
}


echo $content; ?>
<br />
Total : <?php echo $total ?> €